package wowcatsim.strategy;

import wowcatsim.SimulatorJob.Action;
import wowcatsim.interfaces.CatStrategy;

public class RoarRipRakeMangleStrategy extends CatStrategy {

    @Override
    public Action getAction() {
        if (status.getComboPoints() >= 1 && status.getRoarTimer() == 0 && (status.getEnergy() >= 25 || status.isOocUp())) {
            return Action.ROAR;
        }
        if (status.getComboPoints() >= 5) {
            if (status.getRipTimer() == 0 && (status.getEnergy() >= 30 || status.isOocUp()))
                return Action.RIP;
            else
                return Action.NONE;
        }
        if (status.getRakeTimer() == 0) {
            if ((status.getEnergy() >= status.getRakeCost()) || status.isOocUp()) {
                return Action.RAKE;
            } else {
                return Action.NONE;
            }
        }
        if ((status.getEnergy() >= status.getMangleCost()) || status.isOocUp()) {
            return Action.MANGLE;
        }
        return Action.NONE;
    }
}
